<RelativeLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context=".MainActivity">
    <!-- adding progress bar -->
    <ProgressBar
        android:id="@+id/progress_Bar"
        style="?android:attr/progressBarStyle"
        android:layout_width="200dp"
        android:layout_height="wrap_content"
        android:layout_marginLeft="70dp"
        android:layout_marginTop="150dp"
        android:indeterminate = "true"
        android:max="100"
        android:minWidth="200dp"
        android:minHeight="50dp"
        android:visibility="invisible"
        android:layout_centerInParent="true"
        android:progress="0"
        android:layout_marginStart="70dp" />

    <!-- adding textview which will show the progress -->
    <TextView
        android:id="@+id/text_view"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_below="@+id/progress_Bar"
        android:layout_centerHorizontal="true" />
    <!-- adding button to start the progress -->
    <Button
        android:id="@+id/show_button"
        android:layout_width="191dp"
        android:layout_height="wrap_content"
        android:layout_below="@+id/text_view"
        android:layout_marginLeft="70dp"
        android:layout_marginTop="20dp"
        android:text="Progress Bar"
        android:layout_centerHorizontal="true"
        android:layout_marginStart="70dp" />
</RelativeLayout>